-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table - cell merging #4046
Table - cell merging #4046
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me but @tylerjbainbridge should probably have a look. @zurfyx Maybe add a couple of test cases for showing what happens when you insert/delete a column or row which contains or insersects one with a merged cell.
|
||
type TableCellActionMenuProps = Readonly<{ | ||
contextRef: {current: null | HTMLElement}; | ||
onClose: () => void; | ||
setIsMenuOpen: (isOpen: boolean) => void; | ||
tableCellNode: TableCellNode; | ||
cellMerge__EXPERIMENTAL: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need to mark this as experimental if this is just in the playground. We'll just end up forgetting about it anyway
cellMerge__EXPERIMENTAL: boolean; | |
cellMerge boolean; |
This PR adds support for cell merging on the stable tables implementation. We store this with a simple
__colSpan
and__rowSpan
property on the GridCellNode.There are many follow ups from this PR, including the fact that only basic cases work for now:
getShape()
- indexes fail when merged cells are presentCell merging
Screen.Recording.2023-03-07.at.4.49.26.PM.mov
(yes, the menu visibility needs a fix but we're considering dropping it for a better a11y alternative)
Selection is guaranteed to be rectangular
Screen.Recording.2023-03-07.at.2.58.29.PM.mov
More complicated selection
Screen.Recording.2023-03-07.at.3.13.29.PM.mov